package com.yjtravel.strategy;

/**
 * 打折
 * @author 28336
 * @version 1.0
 * Create by 2024/3/29 9:40
 */
public class CashRebate extends CashSuper{

    /**
     * 折扣
     */
    private final double moneyRebate;

    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double price, double num) {
        return price * num * moneyRebate;
    }
}
